<?php

namespace App\Http\Controllers;

use App\Models\Filter;
use App\Models\SharpToGoods;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
    
    public function filter()
    {
    	$res = SharpToGoods::scheduleReturnAllStock();
    	
    	$filter = new Filter();
    	
    	$res = $filter->createFilter(time());

    	if ($res) {
    		return '今日统计完成';
    	} else {
    		return '今日统计未完成';
    	}
    }

    public function scheduleReturnAllStock()
    {
        $res = SharpToGoods::scheduleReturnAllStock();
    }
}
